package com.example.music_project.mapper;

import com.example.music_project.model.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    //登录校验，查询用户信息
    @Select("select * from user where user_name=#{user.userName}")
    User userLogin(@Param("user") User user);

    @Insert("insert into user(user_name, password) value(#{userName}, #{password})")
    Integer insertUser(String userName, String password);
}
